package com.zhiyou100.review.day005.port.test.port;

/**
 * @packageName: Pig
 * @className: com.zhiyou100.review.day005.port.test.port
 * @Description: TODO Pig 实现 Fly 和 Run 接口
 * @author: yang
 * @date: 6/13/20
 */
public class Pig implements Fly, Run {
    @Override
    public void run() {
        System.out.println("会跑的猪");
    }

    @Override
    public void fly() {
        System.out.println("会飞的猪");
    }

    public static void main(String[] args) {
        Solution solution = new Solution();

    }


}

class Solution {
    public boolean judgeSquareSum(int c) {
        for (long a = 0; a * a <= c; a++) {
            double b = Math.sqrt(c - a * a);
            if (b == (int) b) {
                return true;
            }
        }
        return false;
    }
}

